<template>
	<view class="smart-container">
		<view class="smart-panel-title">
			1. 容器
		</view>
		<view class="smart-panel-h" @click="goDetailPage('view')">
			<text>view视图</text>
		</view>
		<view class="smart-panel-h" @click="goDetailPage('scroll-view')">
			<text>scroll-view滚动视图</text>
		</view>
		<view class="smart-panel-h" @click="goDetailPage('swiper')">
			<text>swiper轮播图视图</text>
		</view>
		<view class="smart-panel-title">
			CSS 补充说明
		</view>
		<view class="smart-panel-h" @click="goDetailPage('flex')">
			<text>Flex 布局</text>
		</view>
		<view class="smart-panel-title">
			2. 基础内容
		</view>
		<view class="smart-panel-h" @click="goDetailPage('text')">
			<text>text 文本编辑</text>
		</view>
		<view class="smart-panel-h" @click="goDetailPage('rich-text')">
			<text>rich-text 富文本编辑器</text>
		</view>
		<view class="smart-panel-h" @click="goDetailPage('progress')">
			<text>progress 进度条</text>
		</view>
		<view class="smart-panel-title">
			3. 表单组件
		</view>
		<view class="smart-panel-h" @click="goDetailPage('button')">
			<text>button 按钮</text>
		</view>
		<view class="smart-panel-h" @click="goDetailPage('radio')">
			<text>radio 单选框</text>
		</view>
		<view class="smart-panel-h" @click="goDetailPage('checkbox')">
			<text>checkbox 多选框</text>
		</view>
		<view class="smart-panel-h" @click="goDetailPage('input')">
			<text>input 输入控件</text>
		</view>
		<view class="smart-panel-h" @click="goDetailPage('picker')">
			<text>picker 选择列表</text>
		</view>
		<view class="smart-panel-h" @click="goDetailPage('slider')">
			<text>slider 滑块</text>
		</view>
		<view class="smart-panel-h" @click="goDetailPage('switch')">
			<text>switch 开关</text>
		</view>
		<view class="smart-panel-h" @click="goDetailPage('textarea')">
			<text>textarea 多行文本输入框</text>
		</view>
		<view class="smart-panel-h" @click="goDetailPage('form')">
			<text>form 表单</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {}
		},
		methods: {
			goDetailPage(e) {
				if (typeof e === "string") {
					uni.navigateTo({
						url: '/pages/component/' + e + '/' + e,
					});
				} else {
					uni.navigateTo({
						url: e.url,
					});
				}
			}
		}
	}
</script>

<style>

</style>
